package com.hmkj.core.model.quote;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 成交明细数据
 *
 * @author Vector
 * @create 2017-11-13 17:08
 */
@Data
public class DealData {

    @ApiModelProperty(value = "买卖方向 1买，2卖")
    private int di;

    @ApiModelProperty(value = "成交价")
    private BigDecimal np;

    @ApiModelProperty(value = "成交数量")
    private long ba;

    @ApiModelProperty(value = "分时时间")
    private String mt;

    @ApiModelProperty(value = "时间戳")
    private long dt;

    public String getMt(){
        SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
        Date date = new Date(dt);
        return format.format(date);
    }

}
